<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .bg {
            width: 1024px;
            height: 582px;
            background-image: url(./踢球练习/chang.jpg);
            position: relative;
        }
        
        .bg img {
            /* 让所有图片起点保持一致 */
            position: absolute;
        }
        
        .bg img:nth-child(1) {
            right: 50px;
            top: 200px;
        }
        
        .bg img:nth-child(2) {
            right: 300px;
            top: 100px;
        }
        
        .bg img:nth-child(3) {
            right: 300px;
            top: 400px;
        }
        
        .bg img:nth-child(5) {
            width: 80px;
            right: 250px;
            top: 450px;
            /* 简写 */
            animation: ball 3s 1 forwards;
        }
        /* 停止动画 */
        
        .bg:active>img:nth-child(5) {
            /* paused暂停 */
            animation-play-state: paused;
        }
        /* 球的运动 */
        
        @keyframes ball {
            0% {
                right: 350px;
                top: 450px;
            }
            25% {
                right: 900px;
                top: 100px;
            }
            50% {
                right: 300px;
                top: 200px;
            }
            75% {
                right: 100px;
                top: 250px;
            }
            100% {
                right: 400px;
                top: 250px;
            }
        }
    </style>
</head>

<body>
    <div class="bg">
        <img src="./踢球练习/qiu1.png" alt="">
        <img src="./踢球练习/qiu2.png" alt="">
        <img src="./踢球练习/qiu3.png" alt="">
        <img src="./踢球练习/qiu4.png" alt="">
        <img src="./踢球练习/ball.png" alt="">
    </div>
</body>

</html>